<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    request.getSession().setAttribute("basePath", basePath);
%>
<html>
<head>
    <title>Spring MVC 文件上传</title>
</head>
<body>
    <h2>请选择文件：</h2>
    <form method="post" action="${basePath}demo/upload"
          enctype="multipart/form-data">
        <%--<input type="text" name="name" />--%>
        <input type="file" name="file" />
        <input type="submit" />
    </form>
</body>
</html>
